import request from '@/utils/request'

// 查询用户分佣记录列表
export function listCommission(query) {
  return request({
    url: '/biz/commission/list',
    method: 'get',
    params: query
  })
}

// 查询用户分佣记录详细
export function getCommission(id) {
  return request({
    url: '/biz/commission/' + id,
    method: 'get'
  })
}

// 新增用户分佣记录
export function addCommission(data) {
  return request({
    url: '/biz/commission',
    method: 'post',
    data: data
  })
}

// 修改用户分佣记录
export function updateCommission(data) {
  return request({
    url: '/biz/commission',
    method: 'put',
    data: data
  })
}

// 删除用户分佣记录
export function delCommission(id) {
  return request({
    url: '/biz/commission/' + id,
    method: 'delete'
  })
}

// 启用禁用用户分佣记录
export function changeStatus(data) {
  return request({
    url: '/biz/commission/changeStatus',
    method: 'put',
    data: data
  })
}